package common.enums;

public enum ResultCodeEnum {
	OK("200", "ok"), ERROR("500", "服务器错误"), NO_AUTH("600", "无该权限"),SERVICE_ERROR("700", "自定义错误");
	// 成员变量
	private String value;
	private String label;

	private ResultCodeEnum(String value, String label) {

		this.value = value;
		this.label = label;
	}

	public String getLabel() {
		return label;
	}

	public void setLabel(String label) {
		this.label = label;
	}

	public String getValue() {
		return value;
	}

	public void setValue(String value) {
		this.value = value;
	}
	
	public static String getLabel(String value) {
		for (ResultCodeEnum m : ResultCodeEnum.values()) {
			if (m.getValue().equals(value)) {
				return m.label;
			}
		}
		return null;
	}
}
